<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript" type="text/javascript">
function upp(s1,s2)
{	
            var xmlHttp;
			alert(s1+","+s2);
            if (s1==""||s2=="")
			{
            document.getElementById("txtHint").innerHTML="";
			} 		
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			{
			alert ("HTTP Error");
			return;
			}		
            var url="ll.php";
            url=url+"?q="+s1;
            url=url+"&email="+s2;	
            xmlHttp.onreadystatechange=stateChanged;		
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null); 		
}
function stateChanged() 
 {  
	 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") 
	 {  
	 alert("Done");
	 document.getElementById("txtHint").innerHTML=xmlHttp.responseText  
	 } 
 } 
function GetXmlHttpObject()
 { 
 var xmlHttp=null;
 try  
 {  
 //others  
 xmlHttp=new XMLHttpRequest();  
 } catch (e)  
 {  
 // Internet Explorer  
 try   {   xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");   }  
	 catch (e)   {   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");  
	 }  
 } 
 return xmlHttp;
 }  
</script>
</head>
<body>
<p>Suggestions: <span id="txtHint"></span></p>

<?php
        $mysql_servername="127.0.0.1";       
		$mysql_username="root";        
		$mysql_password="";         
		$mysql_dbname="paradigmshift_dev";        
		$s1=0;
		$conn=mysql_connect($mysql_servername,$mysql_username,$mysql_password);      
		if(!$conn)   
		{           
			die('Could not connect: ' . mysql_error());                 
		} 
		mysql_select_db("paradigmshift_dev", $conn);
		$result=mysql_query("select * from employees");
		while($row=mysql_fetch_array($result))
		{
		    $s1++;
		    echo '<h1>'.$row['empID'].'</h1>';
			echo '<h1>'.$row['empFname'].' '.$row['empLname'].'</h1>';
			echo '<select id="t'.$s1.'">';
			echo '<option value='.$row['empStatus'].'>'.$row['empStatus'].'</option>';
			echo '<option value="Manager">Manager</option>';
			echo '<option value="Worker">Worker</option>';
			echo '</select>';
			echo '<button onClick="upp('.$row['empID'].',t'.$s1.'.value)">submit</button>';
		}
?>

</body>
</html>